def print_file_info(file_name):
    try:
        with open(file_name, 'r', encoding='utf-8') as f:
            print(f.read())
    except Exception as e:
        print(f'出错啦，错误内容是：{e}')
    finally:
        if f:
            f.close()

def append_file_info(file_name,data):
    with open(file_name, 'a', encoding='utf-8') as f:
        f.write(data)
        f.close()